﻿<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                     http://www.springframework.org/schema/beans/spring-beans-2.0.xsd  
                     http://www.springframework.org/schema/util  
                     http://www.springframework.org/schema/util/spring-util-2.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"
       default-autowire="byName" default-lazy-init="true">


    <!-- 远程服务调用代理 -->
    <bean class="com.ycc.base.framework.remote.client.spring.RemoteServiceScannerConfigurer">
        <property name="basePackage" value="com.ycc.**.api"/>
    </bean>

    <!-- 自定义序列化工厂 -->
    <bean id="remote.serializerFactory.client"
          class="com.zuche.framework.extend.hessian.SerializerFactoryExtendClient">
    </bean>

    <!-- 远程调用配置  hessian-->
    <bean id="remote.hessianProxyFactory"
          class="com.caucho.hessian.client.HessianProxyFactory">

        <property name="serializerFactory">
            <ref bean="remote.serializerFactory.client"/>
        </property>

        <property name="connectTimeout">
            <value>15000</value>
        </property>

        <property name="readTimeout">
            <value>30000</value>
        </property>
    </bean>


    <!-- 远程调用配置 Hessian -->
    <bean id="remote.hessianRemoteClientInternal"
          class="com.zuche.framework.remote.hessian.HessianRemoteClientInternal">
        <property name="hessianFactory">
            <ref bean="remote.hessianProxyFactory"/>
        </property>
    </bean>


    <!-- 远程调用配置  netty-->
    <bean id="remote.tcpRemoteClientInternal"
          class="com.zuche.framework.remote.nio.client.TcpRemoteClientInternal">
    </bean>


    <!-- 远程调用配置 Http -->
    <bean id="remote.httpRemoteClientInternal"
          class="com.zuche.framework.remote.http.HttpRemoteClientInternal">
        <property name="connectTimeout">
            <value>15000</value>
        </property>
        <property name="readTimeout">
            <value>30000</value>
        </property>
    </bean>


    <bean id="remote.controller"
          class="com.zuche.framework.remote.controller.HessianController">
    </bean>

    <bean id="http.controller"
          class="com.zuche.framework.remote.controller.HttpController">
    </bean>
    <!--带有样式的远程调用  -->
    <bean id="view.controller"
          class="com.zuche.framework.remote.view.RemoteViewController">
    </bean>

</beans>
